import os

from flask import Blueprint

manage_bp = Blueprint("manage_bp", __name__)


@manage_bp.route("/restart_panel")
def restart_panel():
    try:
        os.system("supervisorctl restart weed_admin_panel")
    except Exception:
        pass

    return "", 204
